import request from '@/utils/request'

// 查询员工业绩列表
export function listYeji(query) {
  return request({
    url: '/system/yeji/list',
    method: 'get',
    params: query
  })
}

// 查询员工业绩详细
export function getYeji(id) {
  return request({
    url: '/system/yeji/' + id,
    method: 'get'
  })
}

// 新增员工业绩
export function addYeji(data) {
  return request({
    url: '/system/yeji',
    method: 'post',
    data: data
  })
}

// 修改员工业绩
export function updateYeji(data) {
  return request({
    url: '/system/yeji',
    method: 'put',
    data: data
  })
}

// 删除员工业绩
export function delYeji(id) {
  return request({
    url: '/system/yeji/' + id,
    method: 'delete'
  })
}

// 新增员工业绩记录（带验证）
export function addYejiWithValidation(data) {
  return request({
    url: '/system/yeji/addWithValidation',
    method: 'post',
    data: data
  })
}
